<template>
	<Swipe :auto="2500" class="banner-container">
		<SwipeItem v-for="(b,i) in banners"
			:key="i">
			<a :href="b.link"><img :src="b.path" alt=""></a>
		</SwipeItem>
	</Swipe>
</template>
<script>
// import 'swiper/src/swiper.less'
// import Swiper from 'swiper'
import { Swipe, SwipeItem} from 'mint-ui'
export default{
	name: 'Banner',
	created(){
	},
	// watch:{
	// 	banners(){
	// 		this.$nextTick(() => {
	// 			new Swiper('.banner-container', {
	// 				autoplay: {
	// 				    delay: 2500,
	// 				    disableOnInteraction: false,
	// 				},
	// 				pagination: {
	// 			        el: '.swiper-pagination',
	// 			    },
	// 				loop: true
	// 			})
	// 		})
	// 	}
	// },
	props: ['banners'],
	components: { Swipe, SwipeItem }
}
</script>
<style lang='less' scoped>
	.banner-container{
		width: 100%;
		height: 5.33rem;
		background: #fff;
		img{
			width: 100%;
		}
	}
</style>
